let request = require('./libs/request')
let {writeFile} = require('fs')
let {resolve} = require('path')

;(async () => {
    try {
        let {body, headers} = await request('https://shouji.tmall.com/')
        writeFile(resolve('tmp', 'shouji.html'), body, err => {
            console.log(err)
        })
    } catch(e) {
        console.log(e)
    }
})()